package com.msti.service;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import com.msti.entity.StudentBatchCourse;
import com.msti.sessionMgt.ApplicationSession;

public class StudentBatchCourseMgtDAOImpl implements StudentBatchCourseMgtDAO{

	@Override
	public void insert(StudentBatchCourse sbBatchCourse) {
		Session session = ApplicationSession.getSession();
		try {
			session.beginTransaction();
			session.save(sbBatchCourse);
			session.getTransaction().commit();
		} catch (HibernateException he) {
			session.getTransaction().rollback();
			System.out.println(he);
		}
	}

}
